﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//
using PerceptiveMCAPI;
using PerceptiveMCAPI.Types;
//

namespace PerceptiveMCAPI_Test
{
   public partial class show_listMembers : System.Web.UI.UserControl
   {
      public void Display( listMembersOutput output )
      {
         this.Visible = true;
         // ------------------------------------------------
         lblHeader.Text = string.Format( "List: {0}, Members retrieved: {1}",
            output.inputParms.id, output.result.Count.ToString() );
         //
         gvListMembers.DataSource = output.result;
         gvListMembers.DataBind();
         if ( gvListMembers.Rows.Count > 0 )
         {
            gvListMembers.HeaderRow.Cells[1].Text = string.Format( "{0}", output.inputParms.status );
         }
      }
   }
}